using System;
using System.Drawing;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace TCCT_CTC_CSDLDangVienV1
{
    public static partial class UI
    {
        private static XtraForm _myForm = null;
        private static bool _isForcus = false;

        public static bool IsForcus
        {
            get { return UI._isForcus; }
            set { UI._isForcus = value; }
        }

        public static XtraForm MyForm
        {
            get { return _myForm; }
            set { _myForm = value; }
        }

        private static CheckEdit _myControl = null;

        public static CheckEdit MyControl
        {
            get { return UI._myControl; }
            set { UI._myControl = value; }
        }

        public class EventCheckEdit
        {
            public static void CheckEdit_KeyDown(object sender, KeyEventArgs e)
            {

                if (e.KeyCode == Keys.Enter)
                    SendKeys.Send("{Tab}");
            }
        }

        public static class CheckBox
        {
            public static void ApplyDefault(CheckEdit control)
            {
                control.Properties.AppearanceReadOnly.BackColor = READ_ONLY_COLOR;
                control.Properties.FullFocusRect = true;
                control.KeyDown += new KeyEventHandler(EventCheckEdit.CheckEdit_KeyDown);
            }

            public static void ApplyNotEnterKeyDown(CheckEdit control)
            {
                control.Properties.FullFocusRect = true;
            }
        }
    }
}
